3.2 \(\int \frac {\cos ^3(x)}{i+\cot (x)} \, dx\)

Optimal. Leaf size=29 \[ \frac {1}{5} i \sin ^5(x)-\frac {1}{3} i \sin ^3(x)-\frac {1}{5} \cos ^5(x) \]

[Out]

-1/5*cos(x)^5-1/3*I*sin(x)^3+1/5*I*sin(x)^5

________________________________________________________________________________________

Rubi [A]  time = 0.16, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {3518, 3108, 3107, 2565, 30, 2564, 14} \[ \frac {1}{5} i \sin ^5(x)-\frac {1}{3} i \sin ^3(x)-\frac {1}{5} \cos ^5(x) \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]^3/(I + Cot[x]),x]

[Out]

-Cos[x]^5/5 - (I/3)*Sin[x]^3 + (I/5)*Sin[x]^5

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2564

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 3107

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_.), x_Symbol] :> Int[ExpandTrig[cos[c + d*x]^m*sin[c + d*x]^n*(a*cos[c + d*x] + b*sin[c +
 d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && IGtQ[p, 0]

Rule 3108

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*sin[(c_.) + (d_.)*(x_)]^(n_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_
.) + (d_.)*(x_)])^(p_), x_Symbol] :> Dist[a^p*b^p, Int[(Cos[c + d*x]^m*Sin[c + d*x]^n)/(b*Cos[c + d*x] + a*Sin
[c + d*x])^p, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[a^2 + b^2, 0] && ILtQ[p, 0]

Rule 3518

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[(Sin[e + f*x]
^m*(a*Cos[e + f*x] + b*Sin[e + f*x])^n)/Cos[e + f*x]^n, x] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
 ILtQ[n, 0] && ((LtQ[m, 5] && GtQ[n, -4]) || (EqQ[m, 5] && EqQ[n, -1]))

Rubi steps

\begin {align*} \int \frac {\cos ^3(x)}{i+\cot (x)} \, dx &=-\int \frac {\cos ^3(x) \sin (x)}{-\cos (x)-i \sin (x)} \, dx\\ &=i \int \cos ^3(x) (-i \cos (x)-\sin (x)) \sin (x) \, dx\\ &=i \int \left (-i \cos ^4(x) \sin (x)-\cos ^3(x) \sin ^2(x)\right ) \, dx\\ &=-\left (i \int \cos ^3(x) \sin ^2(x) \, dx\right )+\int \cos ^4(x) \sin (x) \, dx\\ &=-\left (i \operatorname {Subst}\left (\int x^2 \left (1-x^2\right ) \, dx,x,\sin (x)\right )\right )-\operatorname {Subst}\left (\int x^4 \, dx,x,\cos (x)\right )\\ &=-\frac {1}{5} \cos ^5(x)-i \operatorname {Subst}\left (\int \left (x^2-x^4\right ) \, dx,x,\sin (x)\right )\\ &=-\frac {1}{5} \cos ^5(x)-\frac {1}{3} i \sin ^3(x)+\frac {1}{5} i \sin ^5(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 42, normalized size = 1.45 \[ -\frac {\csc (x) (i (10 \sin (2 x)+\sin (4 x))+20 \cos (2 x)+4 \cos (4 x))}{120 (\cot (x)+i)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^3/(I + Cot[x]),x]

[Out]

-1/120*(Csc[x]*(20*Cos[2*x] + 4*Cos[4*x] + I*(10*Sin[2*x] + Sin[4*x])))/(I + Cot[x])

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 26, normalized size = 0.90 \[ -\frac {1}{240} \, {\left (5 \, e^{\left (8 i \, x\right )} + 30 \, e^{\left (6 i \, x\right )} + 10 \, e^{\left (2 i \, x\right )} + 3\right )} e^{\left (-5 i \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(I+cot(x)),x, algorithm="fricas")

[Out]

-1/240*(5*e^(8*I*x) + 30*e^(6*I*x) + 10*e^(2*I*x) + 3)*e^(-5*I*x)

________________________________________________________________________________________

giac [B]  time = 0.77, size = 69, normalized size = 2.38 \[ -\frac {9 i \, \tan \left (\frac {1}{2} \, x\right )^{2} - 12 \, \tan \left (\frac {1}{2} \, x\right ) - 7 i}{24 \, {\left (\tan \left (\frac {1}{2} \, x\right ) + i\right )}^{3}} - \frac {-45 i \, \tan \left (\frac {1}{2} \, x\right )^{4} - 60 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 70 i \, \tan \left (\frac {1}{2} \, x\right )^{2} + 20 \, \tan \left (\frac {1}{2} \, x\right ) - 13 i}{120 \, {\left (\tan \left (\frac {1}{2} \, x\right ) - i\right )}^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(I+cot(x)),x, algorithm="giac")

[Out]

-1/24*(9*I*tan(1/2*x)^2 - 12*tan(1/2*x) - 7*I)/(tan(1/2*x) + I)^3 - 1/120*(-45*I*tan(1/2*x)^4 - 60*tan(1/2*x)^
3 + 70*I*tan(1/2*x)^2 + 20*tan(1/2*x) - 13*I)/(tan(1/2*x) - I)^5

________________________________________________________________________________________

maple [B]  time = 0.25, size = 93, normalized size = 3.21 \[ \frac {i}{6 \left (\tan \left (\frac {x}{2}\right )+i\right )^{3}}-\frac {3 i}{8 \left (\tan \left (\frac {x}{2}\right )+i\right )}-\frac {1}{4 \left (\tan \left (\frac {x}{2}\right )+i\right )^{2}}-\frac {4 i}{3 \left (\tan \left (\frac {x}{2}\right )-i\right )^{3}}+\frac {3 i}{8 \left (\tan \left (\frac {x}{2}\right )-i\right )}+\frac {2 i}{5 \left (\tan \left (\frac {x}{2}\right )-i\right )^{5}}+\frac {1}{\left (\tan \left (\frac {x}{2}\right )-i\right )^{4}}-\frac {1}{\left (\tan \left (\frac {x}{2}\right )-i\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3/(I+cot(x)),x)

[Out]

1/6*I/(tan(1/2*x)+I)^3-3/8*I/(tan(1/2*x)+I)-1/4/(tan(1/2*x)+I)^2-4/3*I/(tan(1/2*x)-I)^3+3/8*I/(tan(1/2*x)-I)+2
/5*I/(tan(1/2*x)-I)^5+1/(tan(1/2*x)-I)^4-1/(tan(1/2*x)-I)^2

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^3/(I+cot(x)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

mupad [B]  time = 0.49, size = 74, normalized size = 2.55 \[ \frac {\left (-15\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6+{\mathrm {tan}\left (\frac {x}{2}\right )}^5\,10{}\mathrm {i}+5\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,8{}\mathrm {i}-9\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+\mathrm {tan}\left (\frac {x}{2}\right )\,6{}\mathrm {i}+3\right )\,2{}\mathrm {i}}{15\,{\left (1+\mathrm {tan}\left (\frac {x}{2}\right )\,1{}\mathrm {i}\right )}^5\,{\left (\mathrm {tan}\left (\frac {x}{2}\right )+1{}\mathrm {i}\right )}^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3/(cot(x) + 1i),x)

[Out]

((tan(x/2)*6i - 9*tan(x/2)^2 + tan(x/2)^3*8i + 5*tan(x/2)^4 + tan(x/2)^5*10i - 15*tan(x/2)^6 + 3)*2i)/(15*(tan
(x/2)*1i + 1)^5*(tan(x/2) + 1i)^3)

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 36, normalized size = 1.24 \[ - \frac {e^{3 i x}}{48} - \frac {e^{i x}}{8} - \frac {e^{- 3 i x}}{24} - \frac {e^{- 5 i x}}{80} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**3/(I+cot(x)),x)

[Out]

-exp(3*I*x)/48 - exp(I*x)/8 - exp(-3*I*x)/24 - exp(-5*I*x)/80

________________________________________________________________________________________